function getCookieDomain() {
    return location.hostname.match(/^(\d+\.\d+\.\d+\.\d+) | (localhost)$/) ? location.hostname : /.*(\..*\..*)$/.exec(location.hostname)
}
function reFlash() {
    try {
        document.execCommand("Refresh", !1, 0) || window.location.reload()
    } catch(a) {
        window.location.reload()
    }
} !
function(a) {
    function b(a) {
        fish.dom("#rem_it_1w_pop").checked = !!fish.one("#auTipBox").hasClass("auhover"),
        null === fish.dom("#auTipBox") && (fish.dom("#rem_it_1w_pop").checked = !0);
        for (var b = [], c = null, d = 0, e = a.elements.length; e > d; d++) if (c = a.elements[d], "" !== c.name) switch (c.type) {
        case "password":
            b.push(encodeURIComponent(c.name) + "=" + encodeURIComponent(fish.MD5(c.value)));
            break;
        case "button":
            break;
        case "checkbox":
            if (!c.checked) break;
        default:
            b.push(encodeURIComponent(c.name) + "=" + encodeURIComponent(c.value))
        }
        return b.join("&")
    }
    function c(a) {
        return document.getElementById(a)
    }
    function d(a, b) {
        var c = fish.all("#imgValidCode");
        c.length && (fish.one("#validCode").val(""), c.attr("src", a + "&ran=" + Math.random() + "&name=" + b))
    }
    function e() {
        fish.one("#validCode").removeClass("c_right"),
        fish.one(".comm_cont .code_box").addClass("none"),
        fish.one(".comm_cont .register").addClass("temhight")
    }
    function f() {
        fish.one("#validCode").removeClass("c_right"),
        fish.one(".comm_cont .code_box").removeClass("none"),
        fish.one(".comm_cont .register").removeClass("temhight")
    }
    function g(a, b) {
        return function() {
            b.apply(a, arguments)
        }
    }
    function h(a, b) {
        a && (a.style.visibility = "visible", a.innerHTML = b)
    }
    function i(a) {
        var b = {
            phoneNameId: "phLoginName",
            phValidId: "phvalidCode",
            phonePwdInputId: "phonePwd",
            getYzmBtnId: "getYzm",
            phoneLoginBtnId: "phoneLoginBtn",
            onSuccessLogin: function() {},
            onSuccessExit: function() {},
            onPassFailed: function() {},
            onNameFailed: function() {},
            onLoginFailed: function() {},
            onExitFailed: function() {},
            onLogining: function() {},
            onExiting: function() {},
            onAbort: function() {},
            onTimeout: function() {}
        };
        fish.lang.extend(b, a),
        fish.lang.extend(this, b),
        this.init()
    }
    function j(a) {
        var b = {
            url: "",
            timeout: 8e3,
            onTimeout: function() {},
            onAbort: function() {},
            onError: function() {},
            onLoginCallBack: function() {},
            onExitCallBack: function() {},
            onStartLogin: function() {},
            onStartExit: function() {}
        };
        fish.lang.extend(b, a),
        fish.lang.extend(this, b),
        this.init()
    }
    fish.admin.branch("debug"),
    fish.admin.combine(!1),
    fish.admin.config({
        MD5: {
            v: .1,
            g: 2013072401
        }
    }),
    fish.require("MD5",
    function() {});
    var k = function(a) {
        fish.lang.extend(this, a)
    };
    k.prototype = {
        abort: function() {
            this.ajaxObj && this.ajaxObj.abort()
        },
        send: function() {
            this.ajaxObj = fish.ajax({
                type: "json",
                openType: "post",
                url: this.url,
                timeout: this.timeout,
                data: this.data,
                fn: this.fn,
                err: this.err,
                onTimeout: this.onTimeout
            })
        }
    },
    i.prototype = {
        set: function(a) {
            fish.lang.extend(this, a)
        },
        init: function() {
            function b() {
                fish.ajax({
                    url: "/AjaxHandler/ValidCode.ashx?action=checkmobilecode",
                    data: "&codeKey=" + fish.trim(fish.one("#phvalidCode").val()) + "&name=" + fish.one("#phLoginName").val(),
                    type: "string",
                    openType: "post",
                    fn: function(a) {
                        return a ? "0" == a ? (fish.all(".ident_code").css("border:1px solid #ddd"), fish.dom("#warnTip").style.visibility = "hidden", fish.one("#phvalidCode").addClass("c_right"), v = !0, !0) : (h(fish.dom("#warnTip"), "验证码不正确，请重新填写验证码"), i(), fish.one(".phon_cont .ident_code").css("border:1px solid #f60"), fish.one("#phvalidCode").removeClass("c_right"), v = !1, !1) : void 0
                    }
                })
            }
            function i() {
                fish.one("#phvalidCode").val(""),
                fish.one("#phvalidCode").removeClass("c_right"),
                fish.one("#phimgValidCode").attr("src", "https://passport.ly.com/AjaxHandler/ValidCode.ashx?action=getmobilecheckcode   &ran=" + Math.random() + "&name=" + fish.one("#phLoginName").val())
            }
            function k() {
                var a, b = 60;
                fish.one("#getYzm").css("display:none;"),
                a = setInterval(function() {
                    return b--,
                    0 >= b ? (clearInterval(a), fish.one("#getYzm").css("display:block"), void fish.one("#phoneResend").css("display:none;")) : void fish.one("#phoneResend").html(b + "秒后重发")
                },
                1e3),
                fish.one("#phoneResend").html(b + "秒后重发").css("display:block;")
            }
            function l(a) {
                var b = fish.one(s.nameInput);
                b.attr("isCheck", "false"),
                l.ajaxObj && l.ajaxObj.abort(),
                l.ajaxObj = fish.ajax({
                    url: s.stepURL,
                    data: "action=checkerrcount&name=" + b.val(),
                    type: "json",
                    timeout: s.stepTime,
                    fn: function(c) {
                        b.attr("isCheck", "true"),
                        fish.one(s.loginBtn).attr("value-data", b.val()),
                        c.errCount && parseInt(c.errCount, 10) >= 3 ? m(!0, a, p) : m(!1, a, p)
                    }
                })
            }
            function m(a, b, c) {
                a ? (f(), s.validCodeInput.setAttribute("name", "validCode"), fish.one(s.validCodeInput).val(""), d(s.imgValidURL, fish.one(s.nameInput).val())) : (e(), s.validCodeInput.setAttribute("name", "")),
                b && c()
            }
            function n(a) {
                switch (a) {
                case 1:
                    return "用户名不能为空";
                case 2:
                    return "验证码不能为空";
                case 3:
                    return "语音验证码失效";
                case 4:
                    return "用户信息不存在";
                case 5:
                    return "语音验证码错误";
                case 6:
                    return "10分钟内，语音登录最多可试错3次"
                }
            }
            function o() {
                fish.ajax({
                    url:
                    "/login/VerifyVoiceCode?",
                    data: "username=" + fish.trim(fish.one("#account_pop").val()) + "&code=" + fish.one("#voiceCode").val(),
                    type: "json",
                    openType: "post",
                    fn: function(a) {
                        if (a) {
                            if (a.Success === !0) return fish.all(".ident_code").css("border:1px solid #ddd"),
                            fish.dom("#warnTip").style.visibility = "hidden",
                            voiceValid = !0,
                            void aLog.onSuccessLogin(JSON.parse(a.Data));
                            h(fish.dom("#warnTip"), n(a.Code)),
                            fish.dom("#warnTip").style.visibility = "block",
                            fish.one("#voiceVerification").css("border-color:#ff7800")
                        }
                    }
                })
            }
            function p() {
                if (!fish.one("#voiceVerification").hasClass("none")) return o(),
                void(w === !0 && fish.cookie.set({
                    name: "CNMember",
                    value: "MemberId=" + fish.cookie.get("cnUser", "userid"),
                    domain: "ly.com",
                    path: "/",
                    encode: !1
                }));
                var a = fish.one(s.nameInput),
                b = fish.one(s.loginBtn);
                "off" === fish.one("#hdvalid").val() ? "true" === a.attr("isCheck") && b.attr("value-data") === a.val() ? q() : l(!0) : q()
            }
            function q() {
                0 === fish.trim(s.nameInput.value).length || "手机号/邮箱" == fish.trim(s.nameInput.value) ? (h(fish.dom("#warnTip"), "请输入您的用户名"), fish.one(".comm_cont .login_name").css("border:1px solid #f60"), s.onLoginFailed()) : (fish.one("#warnTip").css("visibility:hidden"), s.login())
            }
            function r(b) {
                var c = b || a.event,
                d = c.target || c.srcElement,
                e = (d.nextSibling, c.keyCode || c.which),
                f = c.shiftKey || 16 == e || !1;
                e >= 65 && 90 >= e && !f || e >= 97 && 122 >= e && f ? (document.getElementById("cCapl").style.display = "block", x = 1) : 1 == x && (document.getElementById("cCapl").style.display = "none", x = -1)
            }
            this.inForm = c(this.inFormId),
            this.nameInput = c(this.nameInputId),
            this.phNameInput = c(this.phoneNameId),
            this.phValidIdInput = c(this.phValidId),
            this.passWordInput = c(this.passWordInputId),
            this.voiceInput = c(this.voiceInputId),
            this.loginBtn = c(this.loginBtnId),
            this.phoneLoginBtn = c(this.phoneLoginBtnId),
            this.remebInputId = c(this.remebInputId),
            this.tips = c(this.tipsId),
            this.validCodeInput = c(this.validCodeInputId),
            this.phonePswIuput = c(this.phonePwdInputId),
            this.validCodeBag = this.validCodeInput.parentNode,
            this.getYzmBtn = c(this.getYzmBtnId);
            var s = this;
            this.inForm.onsubmit = function(a) {
                fish.preventDefault(a)
            },
            this.loginBtn.onclick = function() {
                p()
            },
            this.nameInput.setAttribute("placeholderOption", "手机号/邮箱"),
            fish.one("#account_pop").attr("value") ? this.nameInput.style.color = "#333333": this.nameInput.style.color = "#999",
            setInterval(function() {
                fish.one("#actpwd_pop").val().length > 0 ? fish.one(".login_password label").addClass("none") : fish.one(".login_password label").removeClass("none"),
                fish.one("#account_pop").val().length > 0 ? fish.one(".login_name label").addClass("none") : fish.one(".login_name label").removeClass("none")
            },
            100);
            var t = !1;
            fish.one("#phLoginName").attr("value") ? (this.phNameInput.value = fish.one("#phLoginName").attr("value"), this.phNameInput.style.color = "#333", t = !0, fish.one("#phvalidCode").val(""), fish.one("#phimgValidCode").attr("src", "https://passport.ly.com/AjaxHandler/ValidCode.ashx?action=getmobilecheckcode   &ran=" + Math.random() + "&name=" + fish.one("#phLoginName").val())) : (this.phNameInput.setAttribute("placeholderOption", "手机号"), fish.one("#phvalidCode").val(""), this.phNameInput.value = this.phNameInput.getAttribute("placeholderOption"), this.phNameInput.style.color = "#999"),
            this.phNameInput.onfocus = this.nameInput.onfocus = function(a) {
                fish.all(".warnImgWrap").css("visibility:hidden"),
                this.value = fish.trim(this.value),
                this.value === this.getAttribute("placeholderOption") && (this.value = ""),
                fish.one(this).sibling("label").addClass("none"),
                fish.one(this).parent("div").css("border:1px solid #8297b0"),
                this.style.color = "#333",
                this.select()
            };
            var u;
            this.nameInput.onblur = u = function() {
                this.value = fish.trim(this.value),
                "" === this.value ? (this.value = this.getAttribute("placeholderOption"), this.style.color = "#999") : "" !== fish.one("#actpwd_pop").val() ? fish.one(".login_name label").addClass("none") : this.value = fish.one("#account_pop").val(),
                fish.one(this).parent(".login_name").css("border:1px solid #ddd")
            },
            this.passWordInput.onfocus = function() {
                fish.one("#warnTip").css("visibility:hidden"),
                fish.one(".login_password").css("border:1px solid #8297b0"),
                fish.one(".login_password label").css("visibility:hidden"),
                this.style.color = "#333",
                this.select()
            },
            this.passWordInput.onblur = function() {
                fish.dom("#cCapl").style.display = "none",
                fish.one(".login_password").css("border:1px solid #ddd"),
                "" == this.value && fish.one(".login_password label").css("visibility:visible"),
                x = -1
            },
            this.validCodeInput.onfocus = function() {
                fish.all(".warnImgWrap").css("visibility:hidden"),
                fish.one(this).removeClass("c_right"),
                fish.one(this).parent(".ident_code").css("border:1px solid #8297b0"),
                fish.one(this).sibling("label").addClass("none")
            },
            this.validCodeInput.onblur = function() {
                "" == fish.one(this).val() ? (fish.one(this).sibling("label").removeClass("none"), fish.one(this).parent(".ident_code").css("border:1px solid #ddd")) : fish.one(this).val().length < 4 ? (h(fish.dom("#warnTip"), "验证码不正确，请重新填写验证码"), fish.one(this).parent(".ident_code").css("border:1px solid #f60")) : fish.ajax({
                    url: "/AjaxHandler/ValidCode.ashx?action=loginverficationcode&name=" + fish.trim(fish.one("#account_pop").val()) + "&codeKey=" + fish.trim(fish.one("#validCode").val()),
                    type: "string",
                    fn: function(a) {
                        return a ? "0" == a ? (fish.one(".ident_code").css("border:1px solid #ddd"), fish.dom("#warnTip").style.visibility = "hidden", fish.one("#validCode").addClass("c_right"), !0) : (h(fish.dom("#warnTip"), "验证码不正确，请重新填写验证码"), fish.one(".ident_code").css("border:1px solid #f60"), fish.one("#validCode").removeClass("c_right"), fish.one("#validCode").val(""), fish.one("#imgValidCode").attr("src", "https://passport.ly.com/AjaxHandler/ValidCode.ashx?action=getcheckcode&ran=" + Math.random() + "&name=" + fish.one("#account_pop").val()), !1) : void 0
                    }
                })
            },
            this.nameInput.onchange = function() {
                "off" === fish.one("#hdvalid").val() && (null != this.value && "" != this.value && "string" == typeof this.value ? (fish.one(this).attr("isCheck", "false"), l(!1)) : (f(), s.validCodeInput.setAttribute("name", ""))),
                fish.one("#voiceVerification").hasClass("none") === !1 && (fish.all(".warnImgWrap").css("visibility:hidden"), fish.one(".voice_box").addClass("none"), fish.one(".voice_box").css("border:1px solid #ddd"), fish.one(".voice_box input").val(""))
            },
            this.phNameInput.onblur = function() {
                this.value = fish.trim(this.value),
                fish.one(this).parent(".login_name").css("border:1px solid #ddd"),
                "" === this.value ? (this.value = this.getAttribute("placeholderOption"), this.style.color = "#999") : /^1[34578]\d{9}$/.test(this.value) ? (i(), t = !0) : (h(fish.dom("#warnTip"), "请输入正确的手机号"), fish.one(".phon_cont .login_name").css("border:1px solid #f60"))
            },
            this.phValidIdInput.onfocus = function() {
                fish.one(this).parent(".ident_code").css("border:1px solid #8297b0"),
                fish.one(this).sibling("label").addClass("none"),
                "" == fish.trim(fish.one("#phLoginName").val()) || "手机号" == fish.trim(fish.one("#phLoginName").val()) ? (h(fish.dom("#warnTip"), "请输入您的手机号"), fish.one(".phon_cont .login_name").css("border:1px solid #f60")) : /^1[34578]\d{9}$/.test(fish.one("#phLoginName").val()) ? (fish.all(".warnImgWrap").css("visibility:hidden"), fish.one(this).removeClass("c_right")) : i()
            },
            this.voiceInput.onfocus = function() {
                fish.all(".warnImgWrap").css("visibility:hidden"),
                this.value = fish.trim(this.value),
                this.value === this.getAttribute("placeholderOption") && (this.value = ""),
                fish.one(this).sibling("label").addClass("none"),
                fish.one(this).parent("div").css("border:1px solid #8297b0"),
                this.style.color = "#333",
                this.select()
            };
            var v = !1;
            this.phValidIdInput.onblur = function() {
                "" == fish.one(this).val() ? (fish.one(this).sibling("label").removeClass("none"), fish.one(".phon_cont .ident_code").css("border:1px solid #ddd")) : fish.one(this).val().length < 4 ? (h(fish.dom("#warnTip"), "验证码不正确，请重新填写验证码"), fish.one(".phon_cont .ident_code").css("border:1px solid #f60"), v = !1) : b()
            },
            fish.all("#phimgValidCode,#phrefreshValidCode").on("click",
            function() {
                i()
            }),
            this.phonePswIuput.onfocus = function() {
                fish.one("#warnTip").css("visibility:hidden"),
                fish.one(".get_phonepsd").css("border:1px solid #8297b0"),
                fish.one(".get_phonepsd label").css("visibility:hidden")
            },
            this.phonePswIuput.onblur = function() {
                "" == fish.one(this).val() && fish.one(".get_phonepsd label").css("visibility:visible;"),
                fish.one(".get_phonepsd").css("border:1px solid #ddd")
            },
            this.getYzmBtn.onclick = function() {
                "" == fish.trim(fish.one("#phLoginName").val()) || "手机号" == fish.trim(fish.one("#phLoginName").val()) ? (h(fish.dom("#warnTip"), "请输入您的手机号"), fish.one(".phon_cont .login_name").css("border:1px solid #f60")) : /^1[34578]\d{9}$/.test(fish.one("#phLoginName").val()) ? "" == fish.trim(fish.one("#phvalidCode").val()) ? (fish.all(".warnImgWrap").css("visibility:hidden"), h(fish.dom("#warnTip"), "请输入验证码"), fish.one("#phvalidCode").parent(".ident_code").css("border:1px solid #f60")) : setTimeout(function() {
                    v && t ? fish.ajax({
                        url: "/Member/MemberLoginAjax.aspx",
                        openType: "post",
                        data: "name=" + fish.trim(fish.one("#phLoginName").val()) + "&action=GetCode&mobileValid=" + fish.trim(fish.one("#phvalidCode").val()),
                        type: "json",
                        fn: function(b) {
                            if (b && b.state) switch (b.state) {
                            case 100:
                                fish.one(".warnImgWrap").css("visibility:hidden"),
                                h(fish.dom("#phPswTip1"), "动态密码已发送至您的手机，请注意查收"),
                                k();
                                break;
                            case 101:
                                h(fish.dom("#warnTip"), "请勿频繁获取动态密码"),
                                i();
                                break;
                            case 102:
                            case 103:
                                fish.one("#phPswTip1").css("visibility:hidden"),
                                h(fish.dom("#warnTip"), "验证码不正确，请重新填写验证码"),
                                fish.one(".phon_cont .ident_code").css("border:1px solid #f60"),
                                i();
                                break;
                            case 104:
                                h(fish.dom("#warnTip"), "您输入的手机号末注册，请核对后重新输入");
                                break;
                            case 105:
                                h(fish.dom("#warnTip"), "获取动态密码失败，请稍后重试"),
                                i();
                                break;
                            case 106:
                                fish.dom("#passwordChange .sign").className = "sign otb_failed",
                                fish.mPop({
                                    content: fish.dom("#passwordChange")
                                }),
                                fish.dom("#passwordChange .otb_sure").onclick = function() {
                                    fish.mPop.close(),
                                    a.location.href = "https://passport.ly.com/Passport/GetPassword/"
                                },
                                fish.dom(".otb_close").onclick = function() {
                                    fish.mPop.close(),
                                    location.reload()
                                };
                                break;
                            case 201:
                                h(fish.dom("#warnTip"), "请输入正确的手机号");
                                break;
                            case 202:
                                h(fish.dom("#warnTip"), "请输入您的手机号或图片验证码"),
                                i()
                            }
                        }
                    }) : (i(), h(fish.dom("#warnTip"), "验证码不正确，请重新填写验证码"))
                },
                500) : h(fish.dom("#warnTip"), "请输入正确的手机号")
            },
            this.phoneLoginBtn.onclick = function() {
                "" == fish.trim(fish.one("#phLoginName").val()) || "手机号" == fish.trim(fish.one("#phLoginName").val()) ? (h(fish.dom("#warnTip"), "请输入您的手机号"), fish.one(".phon_cont .login_name").css("border:1px solid #f60")) : /^1[34578]\d{9}$/.test(fish.one("#phLoginName").val()) ? "" == fish.one("#phvalidCode").val() ? (fish.all(".warnImgWrap").css("visibility:hidden"), h(fish.dom("#warnTip"), "请输入验证码"), fish.one("#phvalidCode").parent(".ident_code").css("border:1px solid #f60")) : "" == fish.one("#phonePwd").val() ? (h(fish.dom("#warnTip"), "请输入动态密码"), fish.one(".get_phonepsd").css("border:1px solid #f60")) : (fish.one("#phPswTip1").css("visibility:hidden"), fish.ajax({
                    url: "/Member/MemberLoginAjax.aspx",
                    openType: "post",
                    data: "name=" + fish.trim(fish.one("#phLoginName").val()) + "&action=MobileLogin&mobilecode=" + fish.trim(fish.one("#phonePwd").val()),
                    type: "json",
                    fn: function(b) {
                        if (b && b.state) switch (b.state) {
                        case 100:
                            fish.one("#phoneLoginBtn").html(""),
                            fish.one("#phvalidCode").val(""),
                            fish.one("#phoneLoginBtn").removeClass("btn_sign_in").addClass("btn_sign_loading"),
                            b.pageUrl ? a.location.href = b.pageUrl: a.location.href = "http://www.ly.com/";
                            break;
                        case 201:
                            fish.dom("#passwordChange .sign").className = "sign otb_failed",
                            fish.mPop({
                                content: fish.dom("#passwordChange")
                            }),
                            fish.dom("#passwordChange .otb_sure").onclick = function() {
                                fish.mPop.close(),
                                a.location.href = "https://passport.ly.com/Passport/GetPassword/"
                            },
                            fish.dom(".otb_close").onclick = function() {
                                fish.mPop.close(),
                                location.reload()
                            };
                            break;
                        case 202:
                            h(fish.dom("#warnTip"), "获取动态密码失败，请稍后重试");
                            break;
                        case 203:
                        case 209:
                        case 210:
                            h(fish.dom("#warnTip"), "动态码已失效，请重新获取"),
                            i();
                            break;
                        case 204:
                        case 208:
                            h(fish.dom("#warnTip"), "您输入的动态密码有误，请重新填写"),
                            fish.one(".get_phonepsd").css("border:1px solid #f60");
                            break;
                        case 212:
                            h(fish.dom("#warnTip"), "你输入的手机号未注册，请核对后重新输入");
                            break;
                        case 213:
                            h(fish.dom("#warnTip"), "请输入正确的手机号");
                            break;
                        case 205:
                        case 206:
                        case 207:
                        case 211:
                        default:
                            h(fish.dom("#warnTip"), "抱歉，登录失败，请重试")
                        }
                    }
                })) : h(fish.dom("#warnTip"), "请输入正确的手机号")
            };
            var w = !1,
            x = -1;
            u.apply(this.nameInput),
            this.nameInput.onkeydown = function(b) {
                var c = a.ActiveXObject ? event.keyCode: b.which;
                13 == c && (fish.preventDefault(b), p())
            },
            this.passWordInput.onkeydown = function(b) {
                var c = a.ActiveXObject ? event.keyCode: b.which;
                13 == c && (fish.preventDefault(b), p()),
                20 == c && (0 == x ? (document.getElementById("cCapl").style.display = "block", x = 1) : 1 == x && (document.getElementById("cCapl").style.display = "none", x = 0))
            },
            this.passWordInput.onkeypress = r,
            this.validCodeInput && (this.validCodeInput.onkeydown = function(b) {
                var c = a.ActiveXObject ? event.keyCode: b.which;
                13 == c && (fish.preventDefault(b), p())
            }),
            this.lCore = new j({
                url: this.url,
                timeout: 8e3,
                onTimeout: g(s, s.onTimeout),
                onError: g(s, s.onFailed),
                onLoginCallBack: g(s, s.onLoginCallBack),
                onExitCallBack: g(s, s.onExitCallBack),
                onStartLogin: g(s, s.onStartLogin),
                onStartExit: g(s, s.onStartExit),
                onAbort: g(s, s.onAbort)
            })
        },
        showLogining: function() {
            this.loginBtn.innerHTML = "",
            this.tips && (this.tips.style.visibility = "hidden"),
            fish.one(this.loginBtn).removeClass("btn_sign_in").addClass("btn_sign_loading"),
            this.nameInput.Readonly = this.passWordInput.Readonly = "Readonly"
        },
        showLoginNormal: function() {
            this.nameInput.Readonly = this.passWordInput.Readonly = null
        },
        logState: function() {
            return this.lCore.logState()
        },
        login: function() {
            0 === fish.trim(this.nameInput.value).length || "手机号/邮箱" == fish.trim(this.nameInput.value) ? (h(fish.dom("#warnTip"), "请输入您的用户名"), fish.one(".comm_cont .login_name").css("border:1px solid #f60"), this.onLoginFailed()) : 0 === fish.trim(this.passWordInput.value).length ? (h(fish.dom("#warnTip"), "请输入您的密码"), fish.one(".comm_cont .login_password").css("border:1px solid #f60"), this.onLoginFailed()) : this.validCodeInput && "validCode" === this.validCodeInput.getAttribute("name") && 0 === fish.trim(this.validCodeInput.value).length ? (h(fish.dom("#warnTip"), "请填写验证码"), f(), fish.one(".ident_code").css("border:1px solid #f60"), this.onLoginFailed()) : (e(), this.lCore.login(this.inForm, this.timeout))
        },
        exit: function() {
            this.outForm && this.lCore.exit(this.outForm, this.timeout)
        },
        abort: function() {
            "login" === this.logState() ? this.showLoginNormal() : "exit" === this.logState() && this.showExitNormal(),
            this.tips && (this.tips.style.visibility = "hidden"),
            this.lCore.abort()
        },
        onFailed: function(a) {
            "login" === this.logState() ? (this.showLoginNormal(), h(fish.dom("#sign_in_tips_pop"), "抱歉，登录失败，请重试"), this.onLoginFailed(a), this.loginBtn.innerHTML = "登&nbsp;录", fish.one(this.loginBtn).removeClass("btn_sign_loading").addClass("btn_sign_in")) : "exit" === this.logState() && (this.showExitNormal(), this.onExitFailed(a))
        },
        onLoginCallBack: function(b) {
            if (this.showLoginNormal(), "undefined" == typeof b) return this.loginBtn.innerHTML = "登&nbsp;录",
            fish.one(this.loginBtn).removeClass("btn_sign_loading").addClass("btn_sign_in"),
            void h(fish.dom("#sign_in_tips_pop"), "抱歉，登录失败，请重试");
            switch ("off" === fish.one("#hdvalid").val() && (b.errCount && parseInt(b.errCount, 10) >= 3 || 401 === b.state || 402 === b.state || 400 === b.state ? (this.validCodeBag.parentElement && (f(), fish.one(this.validCodeInput).val(""), d(this.imgValidURL, fish.one(this.nameInput).val())), this.validCodeInput.setAttribute("name", "validCode")) : (this.validCodeBag.parentElement && e(), this.validCodeInput.setAttribute("name", ""))), fish.admin.config({
                mPop: {
                    v: "0.2.2",
                    css: 1,
                    g: 2013042701
                }
            }), b.state) {
            case 100:
                this.onSuccessLogin(b),
                this.userName && (this.userName.innerHTML = b.name),
                fish.cookie.set({
                    name: "CNMember",
                    value: "MemberId=" + fish.cookie.get("cnUser", "userid"),
                    domain: "ly.com",
                    path: "/",
                    encode: !1
                });
                break;
            case 200:
                this.onPassFailed(b),
                this.onLoginFailed(b),
                h(fish.dom("#warnTip"), "您输入的用户名不存在，请核对后重新输入"),
                this.loginBtn.innerHTML = "登&nbsp;录",
                fish.one(this.loginBtn).removeClass("btn_sign_loading").addClass("btn_sign_in"),
                fish.one(".login_name").css("border:1px solid #f60"),
                this.validCodeInput && this.validCodeInput.name && d(this.imgValidURL, fish.one(this.nameInput).val());
                break;
            case 300:
                this.onNameFailed(b),
                this.onLoginFailed(b),
                h(fish.dom("#warnTip"), "您输入的用户名和密码不匹配，请重新输入"),
                fish.one("#validCode").removeClass("c_right"),
                this.loginBtn.innerHTML = "登&nbsp;录",
                fish.one(this.loginBtn).removeClass("btn_sign_loading").addClass("btn_sign_in"),
                fish.one(".login_password").css("border:1px solid #f60"),
                this.validCodeInput && this.validCodeInput.name && d(this.imgValidURL, fish.one(this.nameInput).val());
                break;
            case 400:
                this.onLoginFailed(b),
                this.validCodeInput && this.validCodeInput.name && d(this.imgValidURL, fish.one(this.nameInput).val()),
                f(),
                h(fish.dom("#warnTip"), "验证码不正确，请重新填写验证码"),
                this.loginBtn.innerHTML = "登&nbsp;录",
                fish.one(this.loginBtn).removeClass("btn_sign_loading").addClass("btn_sign_in"),
                fish.one(".ident_code").css("border:1px solid #f60");
                break;
            case 401:
            case 402:
                f(),
                this.loginBtn.innerHTML = "登&nbsp;录",
                fish.one("#sign_in_btn_pop").removeClass("btn_sign_loading").addClass("btn_sign_in"),
                fish.one(".ident_code").css("border:1px solid #f60"),
                h(fish.dom("#warnTip"), "请填写验证码");
                break;
            case 500:
                this.loginBtn.innerHTML = "登&nbsp;录",
                fish.one(this.loginBtn).removeClass("btn_sign_loading").addClass("btn_sign_in");
                break;
            case 201:
                fish.dom("#passwordChange .sign").className = "sign otb_failed",
                fish.mPop({
                    content: fish.dom("#passwordChange")
                }),
                fish.dom("#passwordChange .otb_sure").onclick = function() {
                    fish.mPop.close(),
                    a.location.href = "https://passport.ly.com/Passport/GetPassword/"
                },
                fish.dom(".otb_close").onclick = function() {
                    fish.mPop.close(),
                    location.reload()
                };
                break;
            case 204:
                this.onNameFailed(b),
                this.onLoginFailed(b),
                fish.one("#validCode").removeClass("c_right"),
                h(fish.dom("#warnTip"), "您输错密码次数过多，请稍后尝试"),
                this.loginBtn.innerHTML = "登&nbsp;录",
                fish.one(this.loginBtn).removeClass("btn_sign_loading").addClass("btn_sign_in"),
                fish.one(".login_password").css("border:1px solid #f60"),
                this.validCodeInput && this.validCodeInput.name && d(this.imgValidURL, fish.one(this.nameInput).val());
                break;
            case 1001:
            case 1002:
            case 1003:
                this.loginBtn.innerHTML = "登&nbsp;录",
                fish.one(this.loginBtn).removeClass("btn_sign_loading").addClass("btn_sign_in"),
                fish.one(".voice_box").removeClass("none"),
                h(fish.dom("#phPswTip1"), "验证码会以电话形式通知给您，请留意来电");
                break;
            default:
                this.onFailed(b),
                this.loginBtn.innerHTML = "登&nbsp;录",
                fish.one(this.loginBtn).removeClass("btn_sign_loading").addClass("btn_sign_in")
            }
        },
        onExitCallBack: function(a) {
            switch (this.showExitNormal(), this.tips && (this.tips.style.visibility = "hidden"), a.state) {
            case 100:
                this.onSuccessExit(a),
                fish.cookie.remove("loginRecord");
                break;
            default:
                this.onFailed(a)
            }
        },
        onStartLogin: function() {
            this.onLogining(),
            this.showLogining()
        },
        onStartExit: function() {
            this.onExiting(),
            this.showExiting()
        }
    },
    j.prototype = {
        init: function() {
            var a = this;
            this.ajaxObj = new k({
                url: this.url,
                timeout: this.timeout,
                data: "",
                fn: function(b) {
                    "login" === a.logState() ? a.onLoginCallBack(b) : "exit" === a.logState() && a.onExitCallBack(b)
                },
                onTimeout: a.onTimeout,
                err: a.onError
            })
        },
        logState: function() {
            return this.ajaxObj.data.indexOf("action=login") >= 0 ? "login": this.ajaxObj.data.indexOf("action=exit") >= 0 ? "exit": void 0
        },
        login: function(a) {
            this.onStartLogin();
            var c = b(a);
            this.setCookie(c),
            this.ajaxObj.data = c + "&action=login",
            this.ajaxObj.send()
        },
        exit: function(a) {
            this.onStartExit(),
            this.ajaxObj.data = b(a) + "&action=exit",
            this.ajaxObj.send()
        },
        abort: function() {
            this.ajaxObj.abort(),
            this.onAbort()
        },
        setCookie: function(a) {
            for (var b, c = a.split("&"), d = 30, e = !0, f = c.length - 1; f >= 0; f--) if (c[f].indexOf("remember") >= 0 && c[f].indexOf("remember") <= (b = c[f].indexOf("="))) {
                if (d = parseInt(c[f].slice(b + 1)), isNaN(d) || 0 >= d) return;
                c.splice(f, 1),
                e = !1;
                break
            }
        }
    },
    a.logObj = i
} (window);
var strHost, strAllHost;
strHost = getCookieDomain(),
strAllHost = location.hostname.indexOf("17u.cn") > -1 ? "www.17u.cn": "www.ly.com",
function() {
    function a() {
        var a;
        window.location.href.toLowerCase();
        return a = fish.cookie.get("CNSEInfo", "RefId"),
        a = void 0 == a ? "0": a,
        a = "undefined" == a ? "0": a,
        "" === a ? "0": a
    }
    function b() {
        var a = fish.cookie.get("CNMember", "MemberId");
        return a = void 0 == a ? "0": a,
        a = "undefined" == a ? "0": a,
        "" === a ? "0": a
    }
    window.getRefid = a,
    window.getMemberId = b
} (),
fish.ready(function() {
    fish.all(".login_tab li").on("click",
    function() {
        fish.all(".warnImgWrap").css("visibility:hidden"),
        "手机动态密码登录" === fish.one(this).html() ? (fish.one(this).removeClass("nor"), fish.one(this).sibling().addClass("nor"), fish.one(".comm_cont").addClass("none"), fish.one(".phon_cont").removeClass("none"), fish.one("#sign_in_tips_pop").css("visibility:hidden")) : (fish.one(this).removeClass("nor"), fish.one(this).sibling().addClass("nor"), fish.one(".comm_cont").removeClass("none"), fish.one(".phon_cont").addClass("none"), fish.one("#sign_in_tips_pop").css("visibility:hidden"))
    }),
    fish.one("#clearuser").on("click",
    function() {
        fish.cookie.remove("FakeLogin", {
            domain: ".passport.ly.com",
            path: "/"
        }),
        fish.cookie.remove("FakeLogin", {
            domain: "ly.com",
            path: "/"
        }),
        window.location.reload()
    }),
    fish.one("#auTipBox").on("click",
    function() {
        fish.one(this).toggleClass("auhover"),
        fish.dom("#rem_it_1w_pop").checked = !!fish.one(this).hasClass("auhover")
    }),
    !fish.one(".comm_cont").hasClass("none") && fish.one(".comm_cont>div:first-child").hasClass("auto_name") && fish.one(".temhight").css("margin-bottom:-6px")
});
var aLog; !
function() {
    function a(a) {
        fish.preventDefault(a),
        fish.one("#validCode").val(""),
        fish.one("#imgValidCode").attr("src", "https://passport.ly.com/AjaxHandler/ValidCode.ashx?action=getcheckcode&ran=" + Math.random() + "&name=" + fish.one("#account_pop").val())
    }
    var b = getRefid();
    if (aLog = new logObj({
        imgValidURL: "/AjaxHandler/ValidCode.ashx?action=getcheckcode",
        stepURL: "/AjaxHandler/ValidCode.ashx",
        url: "/Member/MemberLoginAjax.aspx",
        userNameId: "user_name",
        inFormId: "login_form_pop",
        nameInputId: "account_pop",
        passWordInputId: "actpwd_pop",
        remebInputId: "rem_it_1w_pop",
        validCodeInputId: "validCode",
        loginBtnId: "sign_in_btn_pop",
        waitLoginId: "logining_pop",
        tipsId: "sign_in_tips_pop",
        autoLoginTipSel: ".autoflag",
        autoLoginTipContSel: ".warnflag",
        voiceInputId: "voiceCode",
        onSuccessLogin: function(a) {
            if (loginState = a.state, 100 == loginState) if (void 0 != a.pageUrl && a.pageUrl.length > 0 && void 0 != a.refid && a.refid.length > 0) window.location.href = a.pageUrl;
            else if (void 0 != a.pageUrl && a.pageUrl.length > 0) window.location.href = encodeURI(a.pageUrl);
            else {
                var c = document.getElementById("returnUrl").value;
                null != c && c.length > 0 ? ("4464767" === b && (c = c + "?mobile=" + document.getElementById("account_pop").value), location.href = c) : location.href = "http://www.ly.com"
            }
        },
        onTimeout: function() {
            loginState = {}
        }
    }), "4464767" === b) {
        var c = '<img src="https://security.40017.cn/cn/img/new_ui/public/images/lm/logo_pufa.png" />';
        fish.dom("#header_lite .logo_right")[0].innerHTML = c;
        var d = document.getElementById("returnUrl").value,
        e = "/register/index/?refid=" + b;
        null != d && d.length > 0 && (e = e + "&url=" + d),
        fish.dom("#id_sign_up")[0].href = e,
        fish.dom("#lblaccount_popup")[0].innerHTML = "手机号："
    }
    fish.all("#imgValidCode,#refreshValidCode").on("click",
    function(b) {
        a(b)
    })
} ();
var mobileElem = fish.one("#mobile");
mobileElem && "" != mobileElem.val() && fish.one("#account_pop").val(mobileElem.val()),
fish.extend({
    getProId: function() {
        return fish.one("#commonProId").val() || 0
    },
    getNmemberId: function() {
        var a = fish.cookie.get("nus", "userid") || fish.cookie.get("us", "userid") || fish.cookie.get("CNMember", "MemberId");
        return a && "undefined" !== a || (a = "0"),
        a
    }
});